package tom.adminlte.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

/**
 *
 * @author ZHUFEIFEI
 */
@Controller
public class IndexController {

    @GetMapping("index")
    public String index() {
        return "index";
    }

    @GetMapping("index2")
    public String index2() {
        return "index2";
    }

    @GetMapping("starter")
    public String start() {
        return "starter";
    }

    @GetMapping("pages/{element}")
    public String pages(@PathVariable("element") String element) {
        return String.format("pages/%s", element);
    }

    @GetMapping("pages/{module}/{element}")
    public String pages(@PathVariable("module") String module,
                        @PathVariable("element") String element) {
        return String.format("pages/%s/%s", module, element);
    }
}
